#include<bits/stdc++.h>
using namespace std;
inline int read()
{
    int f=1,k=0;char c=getchar();
    while(c<'0'||c>'9')
    {
        if(c=='-')f=-1;
        c=getchar();
    }
    while(c>='0'&&c<='9')
    {
        k=(k<<3)+(k<<1)+(c^48);
        c=getchar();
    }
    return f*k;
}
const int M=1e5+5;
int n,ton[M],remains,head,ans;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    n=read();ans=n;
    for(int i=1;i<=n;i++)
    {
        int x=read();
        ton[x]++;
    }
    for(int i=1;i<=100000;i++)
    {
        if(ton[i]!=0)
        {
            head=i;remains=ton[i];break;
        }
    }
    for(int now=head+1;now<=100000;now++)
    {
        if(ton[now]!=0)
        {
            ans-=min(ton[now],remains);remains=max(0,remains-ton[now])+ton[now];
        }
    }
    cout<<ans;
    return 0;
}
